<link href="${base}/res/betou_template/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/res/betou_template/js/jquery.js"></script>
<script type="text/javascript" src="${base}/res/betou_template/js/jquery.tools.js"></script>
<script type="text/javascript" src="${base}/res/betou_template/js/jquery.validate.js"></script>
<script type="text/javascript" src="${base}/res/betou_template/js/common.js"></script>
<script type="text/javascript" src="${base}/res/betou_template/js/input.js"></script>
<script type="text/javascript">
getSmsGroups = function(groupName){
	var smsGroup = "";
	$("#inputForm input[name*=" + groupName + "]").each(function() {
		if( $(this).attr('checked') ){
			smsGroup += $(this).val() + ",";
		}
	});
	return smsGroup;
}

loadSmsNumAndUseNum = function(disabledName, groupName){
	$.ajax({
		url: "../v_sms_use.jspx" ,
		type: "POST",
		data:{"smsGroups": getSmsGroups(groupName)},
		cache: false,
		success: function(message) {
			if (message.type == "success") {
				$('input[name="'+disabledName+'"]').prop("checked", true).prop('disabled',false);
			}else{
				$('input[name="'+disabledName+'"]').prop("checked", false).prop('disabled',true);
			}
			$('#loading').html( message.content );
		},
		error:function(xmlHttpRequest, message, e){
			$.message( "error", e );
		}
	});
}
</script>
